﻿CREATE PROCEDURE [dbo].[ReportSumOfWorkLogs]
	@DateTimeFrom DateTime,
	@DateTimeTo DateTime
AS
BEGIN
	select		[Email] = Person.Email, 
				[Minutes Logged] = sum(Minutes)
	from		WorkLog
		inner join	Person on
		Person.PersonId = WorkLog.PersonId
	where		Workdate > @DateTimeFrom
	and			Workdate < @DateTimeTo
	group by	Person.Email
END